<template>
  <fragment>
    <template v-for="item in this.menuList">
      <el-submenu :index="item.id" :key="item.id" :disabled="item.disabled" v-if="item.children.length>0">
        <template slot="title">
          <i :class="item.icon"></i>
          <span>{{ item.menuName }}</span>
        </template>
        <MenuContent :menu-list="item.children"></MenuContent>
      </el-submenu>
      <el-menu-item :key="item.id" v-else :disabled="item.disabled" :index="item.id" :route="item.url"
                    style="padding-left: 50px">
        <i class="el-icon"></i>
        <span>{{ item.menuName }}</span>
      </el-menu-item>
    </template>
  </fragment>


</template>

<script>
export default {
  name: "MenuContent",
  data() {
    return {}
  },
  props: ['menuList'],
}
</script>


<style lang="less" scoped>


</style>
